package com.bnlr.lrparking.adapter;

import android.graphics.Color;
import android.support.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.bnlr.lrparking.R;
import com.bnlr.lrparking.model.SelectDevelopersM;

import java.util.List;

/**
 * @author : tian
 * time    : 2018/04/02
 * desc    : 选择小区适配器
 */

public class ChooseCommunityAdapter extends BaseQuickAdapter<SelectDevelopersM.DataBean,BaseViewHolder>{
    public ChooseCommunityAdapter(@Nullable List<SelectDevelopersM.DataBean> data) {
        super(R.layout.poi_result_layout,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SelectDevelopersM.DataBean item) {
        helper.setText(R.id.tv_poi_1,item.getName());
        helper.setText(R.id.tv_poi_2,item.getAddress());
        if (helper.getAdapterPosition() == 0) {
            helper.setTextColor(R.id.tv_poi_1,Color.parseColor("#00caa3"));
        }

    }
}
